<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Script 6.2</title>
<link href="../css/global.css" rel="stylesheet" type="text/css">
<style type="text/css">
#main h2 {
	background: url(images/open.png) no-repeat 0% 10%;
	padding-left: 20px;
	cursor: pointer;
}
#main h2.close {
	background-image: url(images/close.png);
}
#main .answer {
  background-color: white;
}
</style>
<script type="text/javascript" src="../js/jquery.js"></script>
<script type="text/javascript">
$(document).ready(function( ) {
	$(".answer").hide();
	$("#main h2").toggle(
		function(){
			$(this).next(".answer").fadeIn();
			$(this).addClass("close");
		},
		function(){
			$(this).next(".answer").fadeOut();
			$(this).removeClass("close");
		}
		);//end of toggle()

}); // end of ready()
</script>
</head>
<body id="twoCol">
<div id="container">
  <div id="banner"><img src="../images/banner.png" alt="Quis Nostrud" width="760" height="65"><span id="badge"><a href="http://www.sawmac.com/missing/js/"></a></span></div>
  <div id="contentWrap">
    <div id="main">
      <h1>A One Page FAQ</h1>
      <h2>I've heard that JavaScript is the long-lost fountain of youth. Is this true?</h2>
      <div class="answer">
        <p>Why, yes it is! Studies prove that learning JavaScript freshens the mind and extends life span by several hundred years. (Note: some scientists disagree with these claims.)</p>
      </div>
      <h2>Can JavaScript really solve all of my problems?</h2>
      <div class="answer">
        <p>Why, yes it can! It's the most versatile programming language ever created and is trained to provide financial management advice, life-saving CPR, and even to take care of household pets.</p>
      </div>
      <h2>Is there nothing JavaScript <em>can&#8217;t</em> do?</h2>
      <div class="answer">
        <p>Why, no there isn&#8217;t! It&#8217;s even able to write its own public relations-oriented Frequently Asked Questions pages. Now that&#8217;s one smart programming language!</p>
      </div>
    </div>
    <div id="sidebar">
      <h2>Script 6.2</h2>
    </div>
  </div>
  <div id="footer"><em>&#8220;Building Interactive Web Sites with JavaScript&#8221;</em></div>
</div>
</body>
</html>
